import React from 'react';
import { getDvaApp } from 'umi';
import { ChildIframe } from '@/components';
import { SAAS_URL_OBJ } from '../../../config/urlConfig';

const fineBase = 'https://finereport.gw-greenenergy.com';

export default () => {
  const url =
    getDvaApp()?._store?.getState()?.user?.menuCode === 'AlarmStatistics'
      ? `${fineBase}/webroot/decision/view/report?viewlet=DIgitalDepartment/digitalBI/储能告警统计/储能告警统计.frm`
      : `${SAAS_URL_OBJ[CLIENT_ENV]}/schemaform/`;

  return <ChildIframe id={'schema-form'} url={url} />;
};
